使表格边框里的<tr> </tr>不显示出来的代码是什么

来源:百度知道 编辑:UC知道 时间:2024/05/25 04:35:43
例如我的网页:
<body>
<table width="1003" border="1" cellpadding="0" cellspacing="0" bordercolor="#0000FF">
<!--DWLayoutTable-->
<tr>
<td width="1003" height="131" align="center" valign="middle">1、这个表格是广告,需要隐藏此<tr> </tr>里的内容</td>
</tr>
<tr>
<td height="32" align="center" valign="middle">2、如果这个表格也需要隐藏,怎么修改</td>
</tr>
<tr>
<td height="32" valign="top">3</td>
</tr>
</table>
<table width="1003" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="1003" height="195" valign="top">

没法设置tr隐藏的,通常是div中包含表格,设置的div隐藏。直接设置相应的div中display属性为none即可。
举例:
<div id="div" style="display: none" >
<form id='modify1' name="modify1" method="post" enctype="multipart/form-data" action="${ctx}/report/rate_exchange.jsp" >
<table class="table_common" id="table1" cellspacing="1" cellpadding="0">
<tr class='title_tr' style="white-space: nowrap; text-align: center;" >
<td style="white-space: nowrap; text-align: center;" colspan="1">
<input type="button" style="white-space: nowrap; text-align: center;" />
</td>
</tr>
</table>
</form>
</div>

<body>
<table width="1003" border="1" cellpadding="0" cellspacing="0" bordercolor="#0000FF"